<template>
  <div>
    <div class ="banner" @click="handleBannerClick">
        <img class="banner-img" src ="//img1.qunarzz.com/sight/p0/1505/3a/3aa09a8f14427649.water.jpg_600x330_1b0a92f1.jpg"/>
        <div class="banner-info">
            <div class="banner-tittle">合肥宝贝地球村</div>
            <div class="banner-number">
                <span class="iconfont banner-icon">&#xe64a;</span>
                39
            </div>
        </div>
    </div>
    <common-gallary :imgs="imgs" v-show="showGallary" @close="handleGallaryClose"></common-gallary>
  </div>
</template>

<script>
import CommonGallary from 'common/gallary/Gallary'
export default {
  name: 'DetailBanner',
  data () {
    return {
      showGallary: false,
      imgs: ['http://img1.qunarzz.com/sight/p0/1507/5c/ffe0cb8e0ee3458d33ac23e0f992e31f.water.jpg_350x240_ae7f7258.jpg',
        'http://img1.qunarzz.com/sight/p0/1507/9c/fdce6b4d56db851c8cd489df498ac85b.water.jpg_350x240_fe284d78.jpg']
    }
  },
  methods: {
    handleBannerClick () {
      this.showGallary = true
    },
    handleGallaryClose () {
      this.showGallary = false
    }
  },
  components: {
    CommonGallary
  }
}
</script>

<style lang="stylus" scoped>
    @import '~styles/varibles.styl'
    .banner
        position: relative
        overflow: hidden
        height: 0
        padding-bottom: 55%
        .banner-img
            width: 100%
        .banner-info
            display: flex
            position: absolute
            left: 0
            right: 0
            bottom: 0
            line-height: .6rem
            color: #fff
            background-image: linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0, 0.8))
            .banner-tittle
                flex: 1
                font-size: .32rem
                padding: 0 .2rem
            .banner-number
                margin-top: .14rem
                padding: 0 .4rem
                height: .32rem
                line-height: .32rem
                border-radius: .2rem
                font-size: .24rem
                background: rgba(0,0,0, 0.8)
                .banner-icon
                    font-size: .24rem
</style>
